import {reqcatelist, reqsecklist, reqviplist} from '../../http/api'
const state = {
    // 初始值
    list:[]
}

const getters = {
    list(state){
        return state.list
    }
}

const mutations = {
    changlist(state,list){
     state.list=list
    }
}

const actions = {
    // 
    reqList(context){
        //发请求
       reqsecklist({}).then(res=>{
            if(res.data.code==200){
                //修改list 
                console.log(res.data.list);
                context.commit("changlist",res.data.list?res.data.list:[])
            }
        })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true
}